package com.bone.order.po;

import java.io.Serializable;
import java.util.Date;

import com.bone.constant.Constant;
import com.bone.constant.OrderConstant;
import com.bone.util.AmountUtils;
import com.bone.util.PriceUtil;


public class OrdOrderAmountApply implements Serializable {
	/**
	 * 序列化ID.
	 */
	private static final long serialVersionUID = -8350897712243377107L;
	/**
     * 订单金额申请纪录ID.
     */
	private Long amountApplyId;
	/**
     * 订单ID.
     */
	private Long orderId;
	private String orderNo;
	/**
     * 申请修改金额.
     */
	private Long amount;
	/**
	 * 申请修改金额（元）.
	 */
	private float amountYuan;
	/**
     * 申请修改纪录类型.
     */
	private String applyStatus;
	/**
     * 申请类型.
     */
	private String applyType;
	/**
	 * 申请者.
	 */
	private String applyUser;
	/**
	 * 审批者.
	 */
	private String approveUser;
	/**
	 * 审批时间.
	 */
	private Date approveTime;
	/**
	 * 申请时间.
	 */
	private Date applyTime;
	/**
	 * 申请原因.
	 */
	private String applyMemo;
	/**
	 * 审核原因.
	 */
	private String approveMemo;
	
	
	
	 
	public String getApplyStatusZh() {
		return OrderConstant.ORD_ORDER_AMOUNT_STATUS.getCnName(applyStatus);
	}
	public String getApplyTypeZh() {
		return OrderConstant.ORD_ORDER_AMOUNT_TYPE.getCnName(applyType);
	}
	

	/**
	 * 获取订单金额申请纪录ID.
	 * @return
	 */
	public Long getAmountApplyId() {
		return amountApplyId;
	}

	/**
	 * 设置订单金额申请纪录ID.
	 * @param amountApplyId
	 */
	public void setAmountApplyId(Long amountApplyId) {
		this.amountApplyId = amountApplyId;
	}

	/**
	 * 获取订单ID.
	 * @return
	 */
	public Long getOrderId() {
		return orderId;
	}

	/**
	 * 设置订单ID.
	 * @param orderId
	 */
	public void setOrderId(Long orderId) {
		this.orderId = orderId;
	}

	/**
	 * 获取申请修改金额.
	 * @return
	 */
	public Long getAmount() {
		if (amount != null) {
			this.amountYuan = AmountUtils.convertToYuan(amount.longValue());
		}
		return amount;
	}

	/**
	 * 设置申请修改金额.
	 * @param amount
	 */
	public void setAmount(Long amount) {
		this.amount = amount;
	}

	/**
	 * 获取申请修改纪录类型.
	 * @return
	 */
	public String getApplyStatus() {
		return applyStatus;
	}

	/**
	 * 设置申请修改纪录类型.
	 * @param applyStatus
	 */
	public void setApplyStatus(String applyStatus) {
		this.applyStatus = applyStatus == null ? null : applyStatus.trim();
	}

	/**
	 * 获取申请者.
	 * @return
	 */
	public String getApplyUser() {
		return applyUser;
	}

	/**
	 * 设置申请者.
	 * @param applyUser
	 */
	public void setApplyUser(String applyUser) {
		this.applyUser = applyUser == null ? null : applyUser.trim();
	}

	/**
	 * 获取审批者.
	 * @return
	 */
	public String getApproveUser() {
		return approveUser;
	}

	/**
	 * 设置审批者.
	 * @param approveUser
	 */
	public void setApproveUser(String approveUser) {
		this.approveUser = approveUser == null ? null : approveUser.trim();
	}

	/**
	 * 获取审批时间.
	 * @return
	 */
	public Date getApproveTime() {
		return approveTime;
	}

	/**
	 * 设置审批时间.
	 * @param approveTime
	 */
	public void setApproveTime(Date approveTime) {
		this.approveTime = approveTime;
	}

	/**
	 * 获取申请时间.
	 * @return
	 */
	public Date getApplyTime() {
		return applyTime;
	}

	/**
	 * 设置申请时间.
	 * @param createTime
	 */
	public void setApplyTime(Date applyTime) {
		this.applyTime = applyTime;
	}

	/**
	 * 是否审核通过.
	 * @return
	 */
	public boolean isApprovePass() {
		return Constant.ORDER_AMOUNT_MODIFY_STATUS.PASS.name().equals(this.applyStatus);
	}

	/**
	 * 是否要审核.
	 * @return
	 */
	public boolean isApproveUnverified() {
		return Constant.ORDER_AMOUNT_MODIFY_STATUS.UNVERIFIED.name().equals(this.applyStatus);
	}
	
	/**
	 * 获取申请修改金额（元）.
	 * @return
	 */
	public float getAmountYuan() {
		if (amount != null) {
			this.amountYuan = PriceUtil.convertToYuan(amount.longValue());
		}
		return amountYuan;
	}

	/**
	 * 获取申请类型.
	 * @return
	 */
	public String getApplyType() {
		return applyType;
	}

	/**
	 * 设置申请类型.
	 * @param applyType
	 */
	public void setApplyType(String applyType) {
		this.applyType = applyType;
	}
	
	
	/**
	 * 获取申请原因.
	 * @return
	 */
	public String getApplyMemo() {
		return applyMemo;
	}

	/**
	 * 设置申请原因.
	 * @param applyMemo
	 */
	public void setApplyMemo(String applyMemo) {
		this.applyMemo = applyMemo;
	}

	/**
	 * 获取审核原因.
	 * @return
	 */
	public String getApproveMemo() {
		return approveMemo;
	}

	/**
	 * 设置审核原因.
	 * @param approveMemo
	 */
	public void setApproveMemo(String approveMemo) {
		this.approveMemo = approveMemo;
	}
	
   public String getOrderNo() {
		return orderNo;
	}

	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}
	 

}